#pragma once
#include "opopenpitbase.h"

#include "dlgRoadEntity.h"

class COpRoadEntity :	public COpOpenPitBase
{

public:

	COpRoadEntity(HDiMineView* view,IDMAddIn *addin);

	~COpRoadEntity(void);

public:

	virtual int Init();

	virtual void OnExit();

protected:

	void Allocation();

	void Dump();

	void OperateUtilities( );

	BOOL CreateEntity();

	void InsertUtilitys();

	BOOL InitRoadEntities();

	BOOL GetRoadParam();

	void SetEntityProperty(CdmEntVector& dmEntityVector) ;

	BOOL SortEntity(CdmEntVector& dmEntityVector);

	BOOL CreateRoadEntity(CdmEntityBase*& pNewEntity,
		CdmLayerBase* pLayer,
		short color,
		int nCountPt,
		dmDPoint* pPoints,
		int nSectionPt,
		dmDPoint* pSectionPts);

private:

	CdmEntVector            m_EntityAlignment;

	CdmEntVector            m_RoadEntity;

	CParamRoad             m_ParamPitRoad;

	CdmLayerBase                 *m_pToLayer;

};
